package cn.yunhe.biz;

import java.util.List;

import cn.yunhe.dao.INewsDao;
import cn.yunhe.dao.impl.NewsDaoImpl;
import cn.yunhe.entity.News;

public class NewsBiz {
	INewsDao newsDao = new NewsDaoImpl();

	public List<News> getAllNews() {
		return newsDao.getAllNews();
	}

	public boolean addNews(News news) {
		return newsDao.addNews(news);
	}
	
	public int getNewsCount(){
		return newsDao.getNewsCount();
	}
	
	public List<News> getNewsByPage(int pageSize, int currentPage){
		return newsDao.getNewsByPage(pageSize, currentPage);
	}
	
	public List<News> getNewsByCateId(int cateId){
		return newsDao.getNewsByCateId(cateId);
	}
	
	public News getNewsByNewsId(int newsId){
		return newsDao.getNewsByNewsId(newsId);
	}
}
